#!/usr/bin/env python
# coding: utf-8

'''
handler中获取请求参数的方法
'''
import tornado.web
import tornado.ioloop
import tornado.httpserver
from tornado.options import options, define, parse_command_line
from tornado.web import RequestHandler, MissingArgumentError, url

define("port", default=8000, type=int, help='run server on the given port.')




if __name__ == '__main__':
    parse_command_line()
    app = tornado.web.Application([
        url(r'/', IndexHandler, name='index'),
    ], debug=True)
    http_server = tornado.httpserver.HTTPServer(app)
    http_server.listen(options.port)
    tornado.ioloop.IOLoop.current().start()
